<?php
defined('_JEXEC') or die;

jimport('joomla.application.component.modeladmin');

class PhuongModelPhuong extends JModelAdmin{

   function getTable($type='Phuong', $prefix='PhuongTable', $config=array()){
      return JTable::getInstance($type, $prefix, $config);
   }

   function getForm($data=array(), $loadData=TRUE){
      $form = $this->loadForm('com_phuong.phuong', 'Phuong', array('control' => 'jform', 'load_data' => $loadData));
      return $form;
   }

		   protected function loadFormData()
		{
		// Check the session for previously entered form data.
		$data = JFactory::getApplication()->getUserState('com_phuong.edit.phuong.data', array());

		if (empty($data)) {
		$data = $this->getItem();
		}

		return $data;
		}
}